home *** CD-ROM | disk | FTP | other *** search
Modula Implementation | 1997-01-15 | 7.9 KB | 210 lines | [TEXT/3PRM] |
- implementation module files;
-
- import mac_types;
-
- GetVInfo :: !{#Char} !Toolbox -> (!Int,!Int,!Toolbox);
- GetVInfo ioNamePtr t
- = (a,b,NewToolbox);
- where {
- (a,b) = GetVInfo` ioNamePtr t;
- };
-
- GetVInfo` :: !{#Char} !Toolbox -> (!Int,!Int);
- GetVInfo` ioNamePtr t = code (ioNamePtr=A0,t=U)(ioResult=D1,ioVRefNum=D0){
- instruction 0x4FEF 0xFFA0 || lea -64(sp),sp
- instruction 0x42AF 0x000C || clr.l 12(sp)
- instruction 0x5E88 || addq.l #7,a0
- instruction 0x2F48 0x0012 || move.l a0,18(sp)
- instruction 0x426F 0x0016 || clr.w 22(sp)
- instruction 0x3F7C 0xFFFF 0x001C || move.w #-1,28(sp)
- instruction 0x204F || move.l sp,a0
- instruction 0xA007 || dc.w $A007 ; _GetVolInfo
- instruction 0x48C0 || ext.l d0
- instruction 0x2200 || move.l d0,d1
- instruction 0x302F 0x0016 || move.w 22(sp),d0
- instruction 0x48C0 || ext.l d0
- instruction 0x4FEF 0x0060 || lea 64(sp),sp
- };
-
- GetCatInfo1 :: !Int !{#Char} !Toolbox -> (!Int,!Int,!Toolbox);
- GetCatInfo1 ioVRefNum ioNamePtr t
- = (a,b,NewToolbox);
- where {
- (a,b) = GetCatInfo1` ioVRefNum ioNamePtr t;
- };
-
- GetCatInfo1` :: !Int !{#Char} !Toolbox -> (!Int,!Int);
- GetCatInfo1` ioVRefNum ioNamePtr t = code (ioVRefNum=D1,ioNamePtr=A0,t=U)(ioResult=D1,ioDrParID=D0){
- instruction 0x4FEF 0xFF94 || lea -108(sp),sp
- instruction 0x42AF 0x000C || clr.l 12(sp)
- instruction 0x5E88 || addq.l #7,a0
- instruction 0x2F48 0x0012 || move.l a0,18(sp)
- instruction 0x3F41 0x0016 || move.w d1,22(sp)
- instruction 0x426F 0x001C || clr.w 28(sp)
- instruction 0x42AF 0x0030 || clr.l 48(sp)
- instruction 0x204F || move.l sp,a0
- instruction 0x7009 || MOVEQ #9,D0
- instruction 0xA260 || DC.W $A200+96
- instruction 0x48C0 || ext.l d0
- instruction 0x2200 || move.l d0,d1
- instruction 0x202F 0x0064 || move.l 100(sp),d0
- instruction 0x4FEF 0x006C || lea 108(sp),sp
- };
-
- GetCatInfo2 :: !Int !Int !{#Char} !Toolbox -> (!Int,!{#Char},!Int,!Toolbox);
- GetCatInfo2 ioVRefNum ioDrDirID s t
- = (a,b,c,NewToolbox);
- where {
- (a,b,c) = GetCatInfo2` ioVRefNum ioDrDirID s t;
- };
-
- GetCatInfo2` :: !Int !Int !{#Char} !Toolbox -> (!Int,!{#Char},!Int);
- GetCatInfo2` ioVRefNum ioDrDirID s t = code (ioVRefNum=D2,ioDrDirID=D1,s=A0,t=U)(ioResult=D1,ioDrParID=D0,ioNamePtr=A0){
- instruction 0x4FEF 0xFF94 || lea -108(sp),sp
- instruction 0x42AF 0x000C || clr.l 12(sp)
- instruction 0x2C08 || move.l a0,d6
- instruction 0x42A8 0x0004 || clr.l 4(a0)
- instruction 0x5E88 || addq.l #7,a0
- instruction 0x2F48 0x0012 || move.l a0,18(sp)
- instruction 0x3F42 0x0016 || move.w d2,22(sp)
- instruction 0x3F7C 0xFFFF 0x001C || move.w #-1,28(sp)
- instruction 0x2F41 0x0030 || move.l d1,48(sp)
- instruction 0x204F || move.l sp,a0
- instruction 0x7009 || MOVEQ #9,D0
- instruction 0xA260 || DC.W $A200+96
- instruction 0x48C0 || ext.l d0
- instruction 0x2200 || move.l d0,d1
- instruction 0x202F 0x0064 || move.l 100(sp),d0
- instruction 0x2046 || move.l d6,a0
- instruction 0x4FEF 0x006C || lea 108(sp),sp
- };
-
- GetCatInfo3 :: !Int !Int !{#Char} !Toolbox -> (!Int,!Int,!Int,!Toolbox);
- GetCatInfo3 ioVRefNum ioDirID ioNamePtr t
- = (a,b,c,NewToolbox);
- where {
- (a,b,c) = GetCatInfo3` ioVRefNum ioDirID ioNamePtr t;
- };
-
- GetCatInfo3` :: !Int !Int !{#Char} !Toolbox -> (!Int,!Int,!Int);
- GetCatInfo3` ioVRefNum ioDirID ioNamePtr t = code (ioVRefNum=D2,ioDirID=D1,ioNamePtr=A0,t=U)(ioResult=D2,ioFlAttrib=D1,ioDrDirID=D0){
- instruction 0x4FEF 0xFF94 || lea -108(sp),sp
- instruction 0x42AF 0x000C || clr.l 12(sp)
- instruction 0x5E88 || addq.l #7,a0
- instruction 0x2F48 0x0012 || move.l a0,18(sp)
- instruction 0x3F42 0x0016 || move.w d2,22(sp)
- instruction 0x426F 0x001C || clr.w 28(sp)
- instruction 0x2F41 0x0030 || move.l d1,48(sp)
- instruction 0x204F || move.l sp,a0
- instruction 0x7009 || MOVEQ #9,D0
- instruction 0xA260 || DC.W $A200+96
- instruction 0x48C0 || ext.l d0
- instruction 0x2400 || move.l d0,d2
- instruction 0x7200 || moveq #0,d1
- instruction 0x122F 0x001E || move.b 30(sp),d1
- instruction 0x202F 0x0030 || move.l 48(sp),d0
- instruction 0x4FEF 0x006C || lea 108(sp),sp
- };
-
- GetWDInfo :: !Int !Toolbox -> (!Int,!Int,!Int,!Toolbox);
- GetWDInfo ioVRefNum t
- = (a,b,c,NewToolbox);
- where {
- (a,b,c) = GetWDInfo` ioVRefNum t;
- };
-
- GetWDInfo` :: !Int !Toolbox -> (!Int,!Int,!Int);
- GetWDInfo` ioVRefNum t = code (ioVRefNum=D1,t=U)(ioResult=D2,ioWDVRefNum=D1,ioWDDirId=D0){
- instruction 0x4FEF 0xFFCC || lea -52(sp),sp
- instruction 0x42AF 0x000C || clr.l 12(sp)
- instruction 0x42AF 0x0012 || clr.l 18(sp)
- instruction 0x3F41 0x0016 || move.w d1,22(sp)
- instruction 0x426F 0x001A || clr.w 26(sp)
- instruction 0x204F || move.l sp,a0
- instruction 0x7007 || MOVEQ #7,D0
- instruction 0xA260 || DC.W $A200+96
- instruction 0x48C0 || ext.l d0
- instruction 0x2400 || move.l d0,d2
- instruction 0x322F 0x0016 || move.w 22(sp),d1
- instruction 0x48C1 || ext.l d1
- instruction 0x202F 0x0030 || move.l 48(sp),d0
- instruction 0x4FEF 0x0034 || lea 52(sp),sp
- };
-
- HGetVol :: !Toolbox -> (!Int,!Int,!Int,!Toolbox);
- HGetVol t = (0,0,0,t);
-
- OpenWD :: !Int !Int !Toolbox -> (!Int,!Toolbox);
- OpenWD ioVRefNum ioWDDirID t = (OpenWD` ioVRefNum ioWDDirID t, NewToolbox);
-
- OpenWD` :: !Int !Int !Toolbox -> Int;
- OpenWD` ioVRefNum ioWDDirID t = code (ioVRefNum=D2,ioWDDirID=D1,t=U)(ioWDVRefNum=D0){
- instruction 0x4FEF 0xFFCC || lea -52(sp),sp
- instruction 0x42AF 0x000C || clr.l 12(sp)
- instruction 0x42AF 0x0012 || clr.l 18(sp)
- instruction 0x3F42 0x0016 || move.w d2,22(sp)
- instruction 0x42AF 0x001C || clr.l 28(sp)
- instruction 0x2F41 0x0030 || move.l d1,48(sp)
- instruction 0x204F || move.l sp,a0
- instruction 0x7001 || MOVEQ #1,D0
- instruction 0xa9ff
- instruction 0xA260 || DC.W $A200+96
- instruction 0x302F 0x0016 || move.w 22(sp),d0
- instruction 0x48C0 || ext.l d0
- instruction 0x4FEF 0x0034 || lea 52(sp),sp
- };
-
- GetFInfo :: !{#Char} !Toolbox -> (!Int,!Int,!Toolbox);
- GetFInfo ioNamePtr t = (ioResult,ioDate_and_Time,NewToolbox);
- where {
- (ioResult,ioDate_and_Time) = GetFInfo` ioNamePtr t;
- };
-
- GetFInfo` :: !{#Char} !Toolbox -> (!Int,!Int);
- GetFInfo` ioNamePtr t = code (ioNamePtr=A0,t=U)(ioResult=D1,ioDate_and_Time=D0){
- instruction 0x4FEF 0xFFB0 || lea -80(sp),sp
- instruction 0x42AF 0x000C || clr.l 12(sp)
- instruction 0x5E88 || addq.l #7,a0
- instruction 0x2F48 0x0012 || move.l a0,18(sp)
- instruction 0x426F 0x0016 || clr.w 22(sp)
- instruction 0x426F 0x001A || clr.w 26(sp)
- instruction 0x3F7C 0xFFFF 0x001C || move.w #-1,28(sp)
- instruction 0x42AF 0x0030 || clr.l 48(sp)
- instruction 0x204F || move.l sp,a0
- instruction 0xA20C || dc.w 0xA20C ; _HGetFInfo
- instruction 0x48C0 || ext.l d0
- instruction 0x2200 || move.l d0,d1
- instruction 0x202F 0x004C || move.l 76(sp),d0
- instruction 0x4FEF 0x0050 || lea 80(sp),sp
- };
-
- SetFileTypeAndCreator :: !{#Char} !{#Char} !{#Char} !Toolbox -> (!Int,!Toolbox);
- SetFileTypeAndCreator type creator ioNamePtr t = code (ioNamePtr=A0,t=U)(ioResult=D1,t2=Z){
- instruction 0x2A2A 0x0008 || move.l 8(a2),d5
- instruction 0x2829 0x0008 || move.l 8(a1),d4
- instruction 0x4FEF 0xFFB0 || lea -80(sp),sp
- instruction 0x42AF 0x000C || clr.l 12(sp)
- instruction 0x5E88 || addq.l #7,a0
- instruction 0x2608 || move.l a0,d3
- instruction 0x2F48 0x0012 || move.l a0,18(sp)
- instruction 0x426F 0x0016 || clr.w 22(sp)
- instruction 0x426F 0x001A || clr.w 26(sp)
- instruction 0x3F7C 0xFFFF 0x001C || move.w #-1,28(sp)
- instruction 0x42AF 0x0030 || clr.l 48(sp)
- instruction 0x204F || move.l sp,a0
- instruction 0xA20C || dc.w 0xA20C ; _HGetFInfo
- instruction 0x48C0 || ext.l d0
- instruction 0x6612 || bne.s l1
- instruction 0x2F43 0x0012 || move.l d3,18(sp)
- instruction 0x2F45 0x0020 || move.l d5,32(sp)
- instruction 0x2F44 0x0024 || move.l d4,36(sp)
- instruction 0x42AF 0x0030 || clr.l 48(sp)
- instruction 0xA20D || dc.w 0xA20D ; _HSetFInfo
- instruction 0x48C0 || l1: ext.l d0
- instruction 0x2200 || move.l d0,d1
- instruction 0x4FEF 0x0050 || lea 80(sp),sp
- };
-
- LaunchApplication :: !{#Char} !Int !Toolbox -> (!Int,!Toolbox);
- LaunchApplication s flags t = (0,t);
-